tree-wide: Remove unused variables detected by CLang
authorColin Walters <walters@verbum.org>
Tue, 25 Oct 2016 17:06:36 +0000 (13:06 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 27 Oct 2016 17:02:01 +0000 (17:02 +0000)
CLang finds these, whereas GCC treats having
`__attribute__((cleanup))` as a use.

This obsoletes https://github.com/ostreedev/ostree/pull/411

Closes: #548
Approved by: jlebon

24 files changed:
src/libostree/ostree-bootloader-grub2.c
src/libostree/ostree-fetcher.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-libarchive.c
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo-static-delta-compilation.c
src/libostree/ostree-repo-static-delta-core.c
src/libostree/ostree-repo-static-delta-processing.c
src/libostree/ostree-repo.c
src/libostree/ostree-sysroot-deploy.c
src/libostree/ostree-sysroot-upgrader.c
src/libostree/ostree-sysroot.c
src/libotutil/ot-gpg-utils.c
src/ostree/ot-admin-builtin-deploy.c
src/ostree/ot-admin-builtin-set-origin.c
src/ostree/ot-admin-builtin-switch.c
src/ostree/ot-admin-builtin-undeploy.c
src/ostree/ot-admin-builtin-unlock.c
src/ostree/ot-admin-builtin-upgrade.c
src/ostree/ot-admin-instutil-builtin-grub2-generate.c
src/ostree/ot-builtin-pull-local.c
src/ostree/ot-builtin-static-delta.c
src/ostree/ot-remote-builtin-add.c
tests/test-mutable-tree.c

index f3dc8e16815b5ea8c940aa83460c4b9b1f9c08eb..0fbb098e2f22726e6b3417647a6b9403dee85401 100644 (file)
@@ -54,7 +54,6 @@ _ostree_bootloader_grub2_query (OstreeBootloader *bootloader,
   gboolean ret = FALSE;
   OstreeBootloaderGrub2 *self = OSTREE_BOOTLOADER_GRUB2 (bootloader);
   g_autoptr(GFile) efi_basedir = NULL;
-  g_autoptr(GFileInfo) file_info = NULL;
 
   if (g_file_query_exists (self->config_path_bios, NULL))
     {
@@ -290,8 +289,6 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
 {
   OstreeBootloaderGrub2 *self = OSTREE_BOOTLOADER_GRUB2 (bootloader);
   gboolean ret = FALSE;
-  g_autoptr(GFile) efi_new_config_temp = NULL;
-  g_autoptr(GFile) efi_orig_config = NULL;
   g_autoptr(GFile) new_config_path = NULL;
   GSubprocessFlags subp_flags = 0;
   glnx_unref_object GSubprocessLauncher *launcher = NULL;
index c2dc8ea467fbb6d3041196947d23396ebeb68cc9..21526813cd9e992c653b9ac96934a3424193f0c5 100644 (file)
@@ -1282,7 +1282,6 @@ _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher  *fetcher,
 {
   gboolean ret = FALSE;
   const guint8 nulchar = 0;
-  g_autofree char *ret_contents = NULL;
   g_autoptr(GMemoryOutputStream) buf = NULL;
   g_autoptr(GMainContext) mainctx = NULL;
   FetchUriSyncData data;
index 42e064002309fdc93cfb3c82e334b0eb640d19c4..7d78a19b3cbe14ec4857045cf311f1d0350bea88 100644 (file)
@@ -592,7 +592,6 @@ write_object (OstreeRepo         *self,
   gboolean do_commit;
   OstreeRepoMode repo_mode;
   g_autofree char *temp_filename = NULL;
-  g_autoptr(GFile) stored_path = NULL;
   g_autofree guchar *ret_csum = NULL;
   glnx_unref_object OstreeChecksumInputStream *checksum_input = NULL;
   g_autoptr(GInputStream) file_input = NULL;
@@ -1093,9 +1092,6 @@ ostree_repo_prepare_transaction (OstreeRepo     *self,
 {
   gboolean ret = FALSE;
   gboolean ret_transaction_resume = FALSE;
-  g_autofree char *stagedir_name = NULL;
-  glnx_fd_close int stagedir_fd = -1;
-  g_auto(GLnxDirFdIterator) dfd_iter = { 0, };
 
   g_return_val_if_fail (self->in_transaction == FALSE, FALSE);
 
@@ -2529,7 +2525,6 @@ write_directory_to_mtree_internal (OstreeRepo                  *self,
   gboolean ret = FALSE;
   OstreeRepoCommitFilterResult filter_result;
   OstreeRepoFile *repo_dir = NULL;
-  g_autoptr(GFileEnumerator) dir_enum = NULL;
   g_autoptr(GFileInfo) child_info = NULL;
 
   if (dir)
index d05b34ea8cd203cab022b7b817620c86639e6f08..3a58d1068851dbc3d9b34d5a8594a3af4b99c5dd 100644 (file)
@@ -300,7 +300,6 @@ aic_apply_modifier_filter (OstreeRepoArchiveImportContext *ctx,
                            const char  *relpath,
                            GFileInfo  **out_file_info)
 {
-  g_autofree char *hardlink = aic_get_final_entry_hardlink (ctx);
   g_autoptr(GFileInfo) file_info = NULL;
   g_autofree char *abspath = NULL;
   const char *cb_path = NULL;
@@ -915,7 +914,6 @@ ostree_repo_write_archive_to_mtree (OstreeRepo                *self,
 #ifdef HAVE_LIBARCHIVE
   gboolean ret = FALSE;
   struct archive *a = NULL;
-  g_autoptr(GFileInfo) tmp_dir_info = NULL;
   OstreeRepoImportArchiveOptions opts = { 0, };
 
   a = archive_read_new ();
index 52455ed44ab32e80cb26ce6f1ff18d06486fe063..9d361d5f5c23a3bcabdbc6b8f2644936952e5018 100644 (file)
@@ -608,10 +608,8 @@ lookup_commit_checksum_from_summary (OtPullData    *pull_data,
   g_autoptr(GVariant) refs = g_variant_get_child_value (pull_data->summary, 0);
   g_autoptr(GVariant) refdata = NULL;
   g_autoptr(GVariant) reftargetdata = NULL;
-  g_autoptr(GVariant) commit_data = NULL;
   guint64 commit_size;
   g_autoptr(GVariant) commit_csum_v = NULL;
-  g_autoptr(GBytes) commit_bytes = NULL;
   int i;
   
   if (!ot_variant_bsearch_str (refs, ref, &i))
@@ -973,7 +971,6 @@ static_deltapart_fetch_on_complete (GObject           *object,
   OstreeFetcher *fetcher = (OstreeFetcher *)object;
   FetchStaticDeltaData *fetch_data = user_data;
   OtPullData *pull_data = fetch_data->pull_data;
-  g_autoptr(GVariant) metadata = NULL;
   g_autofree char *temp_path = NULL;
   g_autoptr(GInputStream) in = NULL;
   g_autoptr(GVariant) part = NULL;
@@ -1430,8 +1427,6 @@ request_static_delta_superblock_sync (OtPullData  *pull_data,
   g_autofree char *delta_name =
     _ostree_get_relative_static_delta_superblock_path (from_revision, to_revision);
   g_autoptr(GBytes) delta_superblock_data = NULL;
-  g_autoptr(GBytes) delta_meta_data = NULL;
-  g_autoptr(GVariant) delta_superblock = NULL;
 
   if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher,
                                                    pull_data->content_mirrorlist,
@@ -2335,8 +2330,6 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
   gboolean opt_gpg_verify_set = FALSE;
   gboolean opt_gpg_verify_summary_set = FALSE;
   const char *url_override = NULL;
-  g_autofree char *base_meta_url = NULL;
-  g_autofree char *base_content_url = NULL;
   gboolean mirroring_into_archive;
   gboolean inherit_transaction = FALSE;
   int i;
@@ -2641,7 +2634,6 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
 
   {
     g_autoptr(GBytes) bytes_sig = NULL;
-    g_autofree char *ret_contents = NULL;
     gsize i, n;
     g_autoptr(GVariant) refs = NULL;
     g_autoptr(GVariant) deltas = NULL;
index acface61372488df3638a1810127a65d4be1e908..d73bdc83ecbbab8d333c510564625c9862da49ab 100644 (file)
@@ -506,8 +506,6 @@ try_content_bsdiff (OstreeRepo                       *repo,
                     GError                           **error)
 {
   gboolean ret = FALSE;
-  g_autoptr(GHashTable) from_bsdiff = NULL;
-  g_autoptr(GHashTable) to_bsdiff = NULL;
   g_autoptr(GBytes) tmp_from = NULL;
   g_autoptr(GBytes) tmp_to = NULL;
   g_autoptr(GFileInfo) from_finfo = NULL;
@@ -551,8 +549,6 @@ try_content_rollsum (OstreeRepo                       *repo,
                      GError                          **error)
 {
   gboolean ret = FALSE;
-  g_autoptr(GHashTable) from_rollsum = NULL;
-  g_autoptr(GHashTable) to_rollsum = NULL;
   g_autoptr(GBytes) tmp_from = NULL;
   g_autoptr(GBytes) tmp_to = NULL;
   g_autoptr(GFileInfo) from_finfo = NULL;
@@ -884,14 +880,12 @@ generate_delta_lowlatency (OstreeRepo                       *repo,
   g_autoptr(GVariant) to_commit = NULL;
   g_autoptr(GHashTable) to_reachable_objects = NULL;
   g_autoptr(GHashTable) from_reachable_objects = NULL;
-  g_autoptr(GHashTable) from_regfile_content = NULL;
   g_autoptr(GHashTable) new_reachable_metadata = NULL;
   g_autoptr(GHashTable) new_reachable_regfile_content = NULL;
   g_autoptr(GHashTable) new_reachable_symlink_content = NULL;
   g_autoptr(GHashTable) modified_regfile_content = NULL;
   g_autoptr(GHashTable) rollsum_optimized_content_objects = NULL;
   g_autoptr(GHashTable) bsdiff_optimized_content_objects = NULL;
-  g_autoptr(GHashTable) content_object_to_size = NULL;
 
   if (from != NULL)
     {
@@ -1273,7 +1267,6 @@ ostree_repo_static_delta_generate (OstreeRepo                   *self,
   const char *opt_filename;
   g_autofree char *descriptor_name = NULL;
   glnx_fd_close int descriptor_dfd = -1;
-  g_autoptr(GVariant) tmp_metadata = NULL;
   g_autoptr(GVariant) fallback_headers = NULL;
   g_autoptr(GVariant) detached = NULL;
   gboolean inline_parts;
@@ -1387,7 +1380,6 @@ ostree_repo_static_delta_generate (OstreeRepo                   *self,
       GBytes *payload_b;
       GBytes *operations_b;
       g_autofree guchar *part_checksum = NULL;
-      g_autoptr(GChecksum) checksum = NULL;
       g_autoptr(GBytes) objtype_checksum_array = NULL;
       g_autoptr(GBytes) checksum_bytes = NULL;
       g_autoptr(GOutputStream) part_temp_outstream = NULL;
index 82c80a2abade5884da4664e6dfa956d91fa6742c..77e7939a6471bd7f633cea2c70664684b255436a 100644 (file)
@@ -356,7 +356,6 @@ ostree_repo_static_delta_execute_offline (OstreeRepo                    *self,
       char checksum[OSTREE_SHA256_STRING_LEN+1];
       gboolean have_all;
       g_autoptr(GInputStream) part_in = NULL;
-      g_autoptr(GBytes) delta_data = NULL;
       g_autoptr(GVariant) inline_part_data = NULL;
       g_autoptr(GVariant) header = NULL;
       g_autoptr(GVariant) csum_v = NULL;
@@ -864,7 +863,6 @@ _ostree_repo_static_delta_dump (OstreeRepo                    *self,
   g_autofree char *from = NULL; 
   g_autofree char *to = NULL;
   g_autofree char *superblock_path = NULL;
-  glnx_fd_close int superblock_fd = -1;
   g_autoptr(GVariant) delta_superblock = NULL;
   guint64 total_size = 0, total_usize = 0;
   guint64 total_fallback_size = 0, total_fallback_usize = 0;
index 304d7b4ac873a7a919310bb75e6d5cd901213927..95f9ddbab717126221f4e0956f4c26b0606dc1ea 100644 (file)
@@ -188,7 +188,6 @@ _ostree_static_delta_part_execute (OstreeRepo      *repo,
 {
   gboolean ret = FALSE;
   guint8 *checksums_data;
-  g_autoptr(GVariant) checksums = NULL;
   g_autoptr(GVariant) mode_dict = NULL;
   g_autoptr(GVariant) xattr_dict = NULL;
   g_autoptr(GVariant) payload = NULL;
@@ -471,7 +470,6 @@ dispatch_bspatch (OstreeRepo                 *repo,
 {
   gboolean ret = FALSE;
   guint64 offset, length;
-  g_autoptr(GInputStream) in_stream = NULL;
   g_autoptr(GMappedFile) input_mfile = NULL;
   g_autofree guchar *buf = NULL;
   struct bspatch_stream stream;
index d4b1f1d6f6dcf3cd4aab016280d958d74fdaac8a..305588a9d4d417d2a34f78a765f76540e9c1d088 100644 (file)
@@ -4687,7 +4687,6 @@ ostree_repo_regenerate_summary (OstreeRepo     *self,
     guint i;
     g_autoptr(GPtrArray) delta_names = NULL;
     g_auto(GVariantDict) deltas_builder = {{0,}};
-    g_autoptr(GVariant) deltas = NULL;
 
     if (!ostree_repo_list_static_delta_names (self, &delta_names, cancellable, error))
       goto out;
@@ -4890,7 +4889,6 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd,
     {
       g_autofree char *tmpdir_name_template = g_strconcat (tmpdir_prefix, "XXXXXX", NULL);
       glnx_fd_close int new_tmpdir_fd = -1;
-      g_autoptr(GError) local_error = NULL;
 
       /* No existing tmpdir found, create a new */
 
index a14f60056fa5af0c9d0b34afd760d9158ed4326c..41a9a8dff58a255cebda519d2950b6e0c4f8c498 100644 (file)
@@ -534,7 +534,6 @@ checkout_deployment_tree (OstreeSysroot     *sysroot,
   const char *csum = ostree_deployment_get_csum (deployment);
   g_autofree char *checkout_target_name = NULL;
   g_autofree char *osdeploy_path = NULL;
-  g_autoptr(GFile) ret_deploy_target_path = NULL;
   glnx_fd_close int osdeploy_dfd = -1;
   int ret_fd;
 
@@ -1199,7 +1198,6 @@ swap_bootlinks (OstreeSysroot *self,
   gboolean ret = FALSE;
   int old_subbootversion, new_subbootversion;
   glnx_fd_close int ostree_dfd = -1;
-  glnx_fd_close int ostree_subbootdir_dfd = -1;
   g_autofree char *ostree_bootdir_name = NULL;
   g_autofree char *ostree_subbootdir_name = NULL;
 
index 92b8dc8349f2d8c6ea41635d1ff002b0b9dfe5aa..22710bda87e18596caab28aa0a374d1d9c7975e4 100644 (file)
@@ -530,7 +530,6 @@ ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader  *self,
   glnx_unref_object OstreeRepo *repo = NULL;
   char *refs_to_fetch[] = { NULL, NULL };
   const char *from_revision = NULL;
-  g_autofree char *new_revision = NULL;
   g_autofree char *origin_refspec = NULL;
 
   if (self->override_csum != NULL)
index 97f00c4e6b8808092390a85c206352631ee583d2..608d4cff18b78e4896f9d359e38626c47babeb2d 100644 (file)
@@ -689,7 +689,6 @@ parse_deployment (OstreeSysroot       *self,
   glnx_fd_close int deployment_dfd = -1;
   const char *deploy_basename;
   g_autofree char *treebootserial_target = NULL;
-  g_autofree char *deploy_dir = NULL;
   GKeyFile *origin = NULL;
   g_autofree char *unlocked_development_path = NULL;
   struct stat stbuf;
index 9414088d5470b8dcb22dcb16b5f6147aa959ab4a..9042d88bd729507762d1d91f345368ad129d853f 100644 (file)
@@ -73,9 +73,6 @@ ot_gpgme_ctx_tmp_home_dir (gpgme_ctx_t     gpgme_ctx,
                            GCancellable   *cancellable,
                            GError        **error)
 {
-  g_autoptr(GFile) pubring_file = NULL;
-  g_autoptr(GOutputStream) target_stream = NULL;
-  g_autofree char *pubring_path = NULL;
   g_autofree char *tmp_home_dir = NULL;
   gpgme_error_t gpg_error;
   gboolean ret = FALSE;
index c66c9b3f01b3a57f336092259a3b0b04f9bbdfc8..3039cf0de7e62459a5ce42bfd320add479d01e9f 100644 (file)
@@ -58,7 +58,6 @@ ot_admin_builtin_deploy (int argc, char **argv, GCancellable *cancellable, GErro
   glnx_unref_object OstreeSysroot *sysroot = NULL;
   GKeyFile *origin = NULL;
   glnx_unref_object OstreeRepo *repo = NULL;
-  g_autoptr(GPtrArray) new_deployments = NULL;
   glnx_unref_object OstreeDeployment *new_deployment = NULL;
   glnx_unref_object OstreeDeployment *merge_deployment = NULL;
   g_autofree char *revision = NULL;
index be88aa6c3a6c99d12043f58fa021055b83f8cc8e..8b32eb795988c97f2610faa1ec94547665dd15a2 100644 (file)
@@ -120,7 +120,6 @@ ot_admin_builtin_set_origin (int argc, char **argv, GCancellable *cancellable, G
   
   { GKeyFile *old_origin = ostree_deployment_get_origin (target_deployment);
     g_autofree char *origin_refspec = g_key_file_get_string (old_origin, "origin", "refspec", NULL);
-    g_autofree char *new_refspec = NULL;
     g_autofree char *origin_remote = NULL;
     g_autofree char *origin_ref = NULL;
   
@@ -129,7 +128,6 @@ ot_admin_builtin_set_origin (int argc, char **argv, GCancellable *cancellable, G
 
     { g_autofree char *new_refspec = g_strconcat (remotename, ":", branch ? branch : origin_ref, NULL);
       g_autoptr(GKeyFile) new_origin = NULL;
-      g_autoptr(GFile) origin_path = NULL;
       
       new_origin = ostree_sysroot_origin_new_from_refspec (sysroot, new_refspec);
 
index 895538aadf5603624347bd72d40be474836b69fe..485e6cd41ccb424bcd3837fed82d82a77d4d280c 100644 (file)
@@ -53,11 +53,6 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
   g_autofree char *new_remote = NULL;
   g_autofree char *new_ref = NULL;
   g_autofree char *new_refspec = NULL;
-  g_autofree char *new_revision = NULL;
-  g_autoptr(GFile) deployment_path = NULL;
-  g_autoptr(GFile) deployment_origin_path = NULL;
-  glnx_unref_object OstreeDeployment *merge_deployment = NULL;
-  glnx_unref_object OstreeDeployment *new_deployment = NULL;
   glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
   glnx_unref_object OstreeAsyncProgress *progress = NULL;
   gboolean changed;
index e048729d61c4bbd4ae550328ae3b49d9d3986a83..dd41950eca2fa29d1334b74235f2feeea90abc7d 100644 (file)
@@ -41,7 +41,6 @@ ot_admin_builtin_undeploy (int argc, char **argv, GCancellable *cancellable, GEr
   const char *deploy_index_str;
   int deploy_index;
   g_autoptr(GPtrArray) current_deployments = NULL;
-  glnx_unref_object OstreeDeployment *booted_deployment = NULL;
   glnx_unref_object OstreeDeployment *target_deployment = NULL;
 
   context = g_option_context_new ("INDEX - Delete deployment INDEX");
index 9d265325adef60c41fdc9fb123370752a0d9207d..a178937780e2b98eca8cf07ff4e593d20d885e2e 100644 (file)
@@ -44,9 +44,6 @@ ot_admin_builtin_unlock (int argc, char **argv, GCancellable *cancellable, GErro
   gboolean ret = FALSE;
   GOptionContext *context;
   glnx_unref_object OstreeSysroot *sysroot = NULL;
-  glnx_unref_object OstreeRepo *repo = NULL;
-  g_autoptr(GPtrArray) new_deployments = NULL;
-  glnx_unref_object OstreeDeployment *merge_deployment = NULL;
   OstreeDeployment *booted_deployment = NULL;
   OstreeDeploymentUnlockedState target_state;
 
index 81f9bb6fb44b9e69903cbb50b035608319dc2696..2ad74fc686ba7ac07da2a149649932c5d0ef896a 100644 (file)
@@ -52,8 +52,6 @@ ot_admin_builtin_upgrade (int argc, char **argv, GCancellable *cancellable, GErr
   GOptionContext *context;
   glnx_unref_object OstreeSysroot *sysroot = NULL;
   glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
-  g_autoptr(GFile) deployment_path = NULL;
-  g_autoptr(GFile) deployment_origin_path = NULL;
   g_autoptr(GKeyFile) origin = NULL;
   glnx_unref_object OstreeAsyncProgress *progress = NULL;
   gboolean changed;
index ee7fe702ca4ac6addb1dbd26412a32d58e5ad66c..7d837ff4c3c164d0a790859fc9d2fceadb54496f 100644 (file)
@@ -38,12 +38,8 @@ ot_admin_instutil_builtin_grub2_generate (int argc, char **argv, GCancellable *c
 {
   gboolean ret = FALSE;
   guint bootversion;
-  g_autoptr(GFile) subpath = NULL;
-  glnx_unref_object OstreeSePolicy *sepolicy = NULL;
-  g_autoptr(GPtrArray) deployments = NULL;
   GOptionContext *context = NULL;
   glnx_unref_object OstreeSysroot *sysroot = NULL;
-  g_autoptr(GFile) deployment_path = NULL;
 
   context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
 
index 5401a28132207a9a18e15ef83657a626a6e54588..58a653ffd925bc042494ed7b8956fd4ab2e99391 100644 (file)
@@ -60,7 +60,6 @@ ostree_builtin_pull_local (int argc, char **argv, GCancellable *cancellable, GEr
   g_autofree char *src_repo_uri = NULL;
   glnx_unref_object OstreeAsyncProgress *progress = NULL;
   g_autoptr(GPtrArray) refs_to_fetch = NULL;
-  g_autoptr(GHashTable) source_objects = NULL;
   OstreeRepoPullFlags pullflags = 0;
 
   context = g_option_context_new ("SRC_REPO [REFS...] -  Copy data from SRC_REPO");
index a1c220bb7c6170f3f4a82e3f0ab040893e1a75d0..ca29911a3dbdeb94336c4e832038030029e3cd89 100644 (file)
@@ -399,7 +399,6 @@ ostree_builtin_static_delta (int argc, char **argv, GCancellable *cancellable, G
   gboolean ret = FALSE;
   OstreeCommand *command = NULL;
   const char *cmdname = NULL;
-  glnx_unref_object OstreeRepo *repo = NULL;
   int i;
   gboolean want_help = FALSE;
 
index 76b0c75a0de42a1862fa2c71c7ff420ef6d3a957..6e83b2aff97ef4691470c28d5525f552e6ab4b86 100644 (file)
@@ -49,8 +49,6 @@ ot_remote_builtin_add (int argc, char **argv, GCancellable *cancellable, GError
   const char *remote_name;
   const char *remote_url;
   char **iter;
-  g_autofree char *target_name = NULL;
-  g_autoptr(GFile) target_conf = NULL;
   g_autoptr(GVariantBuilder) optbuilder = NULL;
   gboolean ret = FALSE;
 
index fa2f68db18a3197088c188ef205ca2f6c1ed65b7..b357f691756c7838904180ee90fba357f24d0f99 100644 (file)
@@ -110,7 +110,6 @@ test_ensure_dir (void)
 {
   glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
   glnx_unref_object OstreeMutableTree *parent = NULL;
-  g_autoptr(GPtrArray) split_path = NULL;
   GError *error = NULL;
   const char *dirname = "foo";
   const char *filename = "bar";
@@ -129,8 +128,6 @@ static void
 test_replace_file (void)
 {
   glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
-  glnx_unref_object OstreeMutableTree *parent = NULL;
-  g_autoptr(GPtrArray) split_path = NULL;
   GError *error = NULL;
   const char *filename = "bar";
   const char *checksum = "01234567890123456789012345678901";